----------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:/Users/jahei/Dropbox/Why Do People Stay Poor - replication files/replication files/Data/structura
> l/output/counterfactuals.log
  log type:  text
 opened on:   1 Nov 2021, 18:44:08

. 
. * Get original misallocation
. 
. import excel "$output_s/Structural_Results_at_ss_assets_minus_land_of_rich.xlsx", sheet("Sheet1") firstrow cle
> ar 
(5 vars, 2,333 obs)

. 
. quietly: su misallocation, d

. local misallocation_orig = r(sum)

. 
. * Reducing A by 50%
. 
. import delimited "$intermediate\counterfactuals\optimal_case_by_hh3_with_A_reduced_at_ss_assets_minus_land_of_
> rich.csv", clear
(encoding automatically selected: ISO-8859-1)
(3 vars, 2,333 obs)

. 
. gen occup = ceil(case_opt/2) //Quick way to separate cases

. 
. label define occupation 1 "Mixing" 2 "Livestock Rearing Only" 3 "Wage Work Only" 4 "No Work"

. label values occup occupation

. 
. tab occup

                 occup |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
                Mixing |        538       23.06       23.06
Livestock Rearing Only |      1,612       69.10       92.16
        Wage Work Only |        183        7.84      100.00
-----------------------+-----------------------------------
                 Total |      2,333      100.00

. 
. quietly: su misallocation_sim, d

. disp 1 - r(sum)/`misallocation_orig'
.57008374

. 
. * Doubling w
. 
. import delimited "$intermediate\counterfactuals\optimal_case_by_hh3_with_w_doubled_at_ss_assets_minus_land_of_
> rich.csv", clear
(encoding automatically selected: ISO-8859-1)
(3 vars, 2,333 obs)

. 
. gen occup = ceil(case_opt/2) //Quick way to separate cases

. 
. label define occupation 1 "Mixing" 2 "Livestock Rearing Only" 3 "Wage Work Only" 4 "No Work"

. label values occup occupation

. 
. tab occup

                 occup |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
                Mixing |        879       37.68       37.68
Livestock Rearing Only |      1,352       57.95       95.63
        Wage Work Only |        102        4.37      100.00
-----------------------+-----------------------------------
                 Total |      2,333      100.00

. 
. quietly: su misallocation_sim, d

. disp 1 - r(sum)/`misallocation_orig'
.07289002

. 
. * Reducing psi_h by 50%
. 
. import delimited "$intermediate\counterfactuals\optimal_case_by_hh3_psih_reduced_at_ss_assets_minus_land_of_ri
> ch.csv", clear
(encoding automatically selected: ISO-8859-1)
(3 vars, 2,333 obs)

. 
. gen occup = ceil(case_opt/2) //Quick way to separate cases

. 
. label define occupation 1 "Mixing" 2 "Livestock Rearing Only" 3 "Wage Work Only" 4 "No Work"

. label values occup occupation

. 
. tab occup

                 occup |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
                Mixing |        405       17.36       17.36
Livestock Rearing Only |      1,819       77.97       95.33
        Wage Work Only |        109        4.67      100.00
-----------------------+-----------------------------------
                 Total |      2,333      100.00

. 
. quietly: su misallocation, d

. disp 1 - r(sum)/`misallocation_orig'
.01114153

. 
end of do-file

. exit, clear
